using SqlSugar;
using IM.Easy.Core.Audit;

namespace IM.Easy.Entity.System
{
    /// <summary>
    /// 文件资源表
    /// </summary>
    [SugarTable("FileResource")]
    public class FileResource : ICreated, IUpdated
    {
        /// <summary>
        /// 文件唯一标识
        /// </summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true)]
        public Guid Id { get; set; }

        /// <summary>
        /// 文件原始名称
        /// </summary>
        [SugarColumn(ColumnName = "fileName", Length = 500)]
        public string FileName { get; set; }

        /// <summary>
        /// 文件存储路径或 URL
        /// </summary>
        [SugarColumn(ColumnName = "filePath")]
        public string FilePath { get; set; }

        /// <summary>
        /// 文件大小（字节）
        /// </summary>
        [SugarColumn(ColumnName = "fileSize")]
        public long FileSize { get; set; }

        /// <summary>
        /// 文件 扩展名 类型
        /// </summary>
        [SugarColumn(ColumnName = "extension")]
        public string Extension { get; set; }

        /// <summary>
        ///  文件 MIME 类型
        /// </summary>
        [SugarColumn(ColumnName = "mime")]
        public string? Mime { get; set; }

        /// <summary>
        /// 所属文件夹ID
        /// </summary>
        [SugarColumn(ColumnName = "folderId")]
        public Guid? FolderId { get; set; }

        /// <summary>
        /// 上传时间
        /// </summary>
        [SugarColumn(ColumnName = "createdAt")]
        public DateTime? CreatedAt { get; set; }

        /// <summary>
        /// 上传人
        /// </summary>
        [SugarColumn(ColumnName = "createdBy")]
        public long CreatedBy { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [SugarColumn(ColumnName = "updatedAt")]
        public DateTime? UpdatedAt { get; set; }

        /// <summary>
        /// 更新人
        /// </summary>
        [SugarColumn(ColumnName = "updatedBy")]
        public long UpdatedBy { get; set; }

    }
}
